#define _CRT_SECURE_NO_WARNINGS

#include <cstdlib>

#include "file_op.h"

FILE *open_file_read(char const* filePath, const char *errorMessage)
{
    FILE *file = fopen(filePath, "r");
    if(file == nullptr)
    {
        printf("%s\n", errorMessage);
        exit(-1);
    }
    return file;
}

FILE *open_file_write(const char *filePath, const char *errorMessage)
{
    FILE *file = fopen(filePath, "w");
    if(file == nullptr)
    {
        printf("%s\n", errorMessage);
        exit(-1);
    }
    return file;
}

